import "./style.css";
import initDraggableArea from "./drag-api";
import initDraggableAreaBySortable from "./sortable";
import initDraggableAreaByMouseEvent from "./mouse-event";

const dragElements = document.querySelectorAll(".native .ship") as NodeListOf<HTMLElement>;
const landDestination = document.querySelector(".native .destination") as HTMLElement;
initDraggableArea([...dragElements], landDestination);

initDraggableAreaBySortable(".sortable .hangar", ".sortable .destination");

const dragElementsByMouseEvent = document.querySelectorAll(".mouse .ship") as NodeListOf<HTMLElement>;
const landDestinationByMouseEvent = document.querySelector(".mouse .destination") as HTMLElement;
initDraggableAreaByMouseEvent([...dragElementsByMouseEvent], landDestinationByMouseEvent);